//
//  XLPPHeaderView.m
//  XiangLove
//
//  Created by 陈宪栋 on 2017/12/19.
//  Copyright © 2017年 BAOMIHUA.COM. All rights reserved.
//

#import "XLPPHeaderView.h"
#import "XLPersonPageUserInfoView.h"
#import "XLPPGuardianListView.h"

@implementation XLPPHeaderView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        [self setupView];
    }
    return self;
}

- (void)setupView {
    _userInfoView = [[XLPersonPageUserInfoView alloc] initWithFrame:CGRectZero];
    [self addSubview:_userInfoView];
    [_userInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(self);
        make.height.mas_equalTo(ScreenWidth / 375.0 * 400);
    }];
    
    _guardianListView = [[XLPPGuardianListView alloc] initWithFrame:CGRectZero];
    [self addSubview:_guardianListView];
    [_guardianListView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_userInfoView.mas_bottom);
        make.left.bottom.right.equalTo(self);
    }];
}
@end
